﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dbPoll_Application.Models.Question>" %>
    <% var chartTypes = new SelectList(new String[3] { "Vertical Bar", "Horizontal Bar", "Pie" });
       var valueTypes = new SelectList(new String[2] { "Count", "Percentage" });
       String[] chartColours = Model.resultsChart.colours.Split(new Char[]{','});
    %>
    <div class="right">
       <ul class="rightColumnList" id="chartSettingsList">
           <li class="rightColumnListHeading"><h2>Results Chart</h2></li>
           <li class="rightColumnListItem"><label for="active">Display Chart: </label><span><%= Html.CheckBoxFor(m => m.resultsChart.active) %></span></li>
           <li class="rightColumnListItem"><%= Html.HiddenFor(m => m.resultsChart.chartID) %><label for="chartType">Chart Type: </label><span><%= Html.DropDownListFor(m => m.resultsChart.chartType, chartTypes, new { @class = "fontSettings" })%></span></li>
           <li class="rightColumnListItem"><label for="chartValue">Chart Value: </label><span><%= Html.DropDownListFor(m => m.resultsChart.valueType, valueTypes, new { @class = "fontSettings" })%></span></li>
           <li class="rightColumnListItem"><label for="chartColours">Chart Colours: </label><span><span id="showChartColours"><span id="chartColour4" style="background-color:<%= chartColours[3] %>"></span><span id="chartColour3" style="background-color:<%= chartColours[2] %>"></span><span id="chartColour2" style="background-color:<%= chartColours[1] %>"></span><span id="chartColour1" style="background-color:<%= chartColours[0] %>"></span></span><%= Html.HiddenFor(m => m.resultsChart.colours, new { @class = "fontColourSettings" })%></span></li>
           <li class="rightColumnListItem none" id="chartColoursPicker">
               <table id="chartColoursTable">
                   <tr id="goyr"><td style="background-color:Green"></td><td style="background-color:Orange"></td><td style="background-color:Yellow"></td><td style="background-color:Red"></td></tr>
                   <tr id="rgoy"><td style="background-color:Red"></td><td style="background-color:Green"></td><td style="background-color:Orange"></td><td style="background-color:Yellow"></td></tr>
                   <tr id="oygr"><td style="background-color:Orange"></td><td style="background-color:Yellow"></td><td style="background-color:Green"></td><td style="background-color:Red"></td></tr>
               </table>
           </li>
       </ul>
    </div>
